------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  E:\UNIVERSITAT\PHD\PHD\PAPERS\PAPER - AID - FDI\SUBMISSIONS\PSRM\PSRM REPLICATION MATERIALS\PSRM_Aid_FDI_Personalism_Cl
> eaning-stata.log
  log type:  text
 opened on:  10 Oct 2024, 18:55:40

. set more off

. 
. 
. ********************************************************************************
. *                                                                              * 
. * Foreign Aid, FDI and the Personalization of Power in Autocracies             *
. * Bernat Puertas* and Abel Escribà-Folch*+                                     *
. * *Universitat Pompeu Fabra                                                    *
. * +Institut Barcelona d'Estudis Internacionals                                 *
. * Contact: bernat.puertas@upf.edu                                              *
. *                                                                              *  
. ********************************************************************************
. 
. 
. cd "E:\UNIVERSITAT\PHD\PHD\PAPERS\PAPER - AID - FDI\SUBMISSIONS\PSRM\PSRM REPLICATION MATERIALS"
E:\UNIVERSITAT\PHD\PHD\PAPERS\PAPER - AID - FDI\SUBMISSIONS\PSRM\PSRM REPLICATION MATERIALS

. 
. 
. ** CLEANING OF DIFFERENT DATASETS **
. 
. 
. 
. ***** AIDDATA PROJECT ******
. 
. import delimited "AidData Project_noCOW.csv"
(16 vars, 1,561,039 obs)

. 
. 
. sort recipient year 

. order year recipient cowcode

. drop v1  

. 
. * Add cowcodes to Serbia *
. 
. replace cowcode = "345" in 1260239/1273886
(13,648 real changes made)

. 
. * Add cowcodes to USSR *
. 
. replace cowcode = "365" in 1323009/1323028
(20 real changes made)

. 
. * Add cowcodes to Yugoslavia *
. 
. replace cowcode = "345" in 1532554/1532751
(198 real changes made)

. 
. 
. export delimited "AidData Project_COW.csv", replace
file AidData Project_COW.csv saved

. 
. clear

. 
. ***** WDI *****
. 
. 
. import delimited "WDI_noCOW.csv"
(13 vars, 11,073 obs)

. 
. * Add cowcode to Serbia
. 
.  replace v13 = "345" in 8570/8620
(51 real changes made)

.  
. export delimited "WDI_COW.csv", replace
file WDI_COW.csv saved

. 
. clear

. 
. 
. 
. ***** ROSS *****
. 
. import delimited "Ross_noCOW.csv"
(7 vars, 15,521 obs)

. 
. 
. * Czechoslovakia *
. 
. replace cowcode = "315" in 3653/3735
(83 real changes made)

. 
. * RDA * 
. replace cowcode = "265" in 5396/5478
(83 real changes made)

. 
. * Serbia *
. replace cowcode = "345" in 11787/11869
(83 real changes made)

. 
. * South Vietnam  *
. replace cowcode = "817" in 12617/12699
(83 real changes made)

.   
.  * South Yemen *
. replace cowcode = "680" in 15107/15189
(83 real changes made)

. 
. * USSR *  
. replace cowcode = "365" in 12700/12782
(83 real changes made)

.   
. * North Yemen*
. replace cowcode = "678" in 15024/15106
(83 real changes made)

.    
. * Yugoslavia *
. replace cowcode = "345" in 15273/15355
(83 real changes made)

. 
. * North Vietnam *   
. replace cowcode = "816" in 10293/10375
(83 real changes made)

. 
. 
. export delimited "Ross_COW.csv", replace
file Ross_COW.csv saved

. 
. clear

. 
. 
. log close
      name:  <unnamed>
       log:  E:\UNIVERSITAT\PHD\PHD\PAPERS\PAPER - AID - FDI\SUBMISSIONS\PSRM\PSRM REPLICATION MATERIALS\PSRM_Aid_FDI_Personalism_Cl
> eaning-stata.log
  log type:  text
 closed on:  10 Oct 2024, 18:56:15
------------------------------------------------------------------------------------------------------------------------------------
